package com.zt.bigdata.helloclient.mongo;

import com.zt.bigdata.document.Customer;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @Author: zhangtong
 * @Date: 2018/9/13 下午5:48
 */

public interface MongoUserService {


    Page<Customer> findByDelFlag(Boolean delFlag, Pageable pageable);

    Customer findOneByAge(Integer age);

    Page<Customer> findByName(String name, Pageable pageable);

    Page<Customer> findByAge(int age, Pageable pageable);

    List<Customer> findAllByAddress(String address);

    Page<Customer> findByAgeGreaterThan(int age, Pageable pageable);

    Page<Customer> findByNameNotNull(Pageable pageable);

    Page<Customer> findByNameLike(String name, Pageable pageable);

    List<Customer> deleteByName(String name);

    Long deleteCustomerByName(String name);

    Customer insert(Customer customer);

    void deleteAllByDelFlag(Boolean delFlag);


}
